package com.example.jin.logactivity;

import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class LogActivity extends AppCompatActivity {
    private Button btn ;
    private static final String TAG = "LIFESTYLE";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.v(LogActivity.TAG, "firstActivity --->onCreate");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout);

        btn = (Button) findViewById(R.id.button);
        btn.setOnClickListener(new btnOnClickLinstener());
    }

    class btnOnClickLinstener implements Button.OnClickListener{
        @Override
        public void onClick(View v) {
            Intent intent = new Intent();
            intent.setClass(LogActivity.this, LogActivity2.class);
            LogActivity.this.startActivity(intent);
        }
    }

    @Override
    protected void onStart() {
        Log.v(LogActivity.TAG, "firstActivity --->onStart");
        super.onStart();
    }

    @Override
    protected void onResume() {
        Log.v(LogActivity.TAG, "firstActivity --->onResume");
        super.onResume();
    }

    @Override
    protected void onPause() {
        Log.v(LogActivity.TAG, "firstActivity --->onPause");
        super.onPause();
    }

    @Override
    protected void onStop() {
        Log.v(LogActivity.TAG, "firstActivity --->onStop");
        super.onStop();
    }

    @Override
    protected void onDestroy() {
        Log.v(LogActivity.TAG, "firstActivity --->onDestroy");
        super.onDestroy();
    }

    @Override
    protected void onRestart() {
        Log.v(LogActivity.TAG, "firstActivity --->onRestart");
        super.onRestart();
    }
}
